package nc.vo.bdf.bdf_d1hc;

import nc.vo.ml.NCLangRes4VoTransl;
import nc.vo.pub.SuperVO;
import nc.vo.pub.lang.UFBoolean;
import nc.vo.pub.lang.UFDateTime;
import nc.vo.pub.lang.UFDouble;

public class CustBasVO extends SuperVO {

	public String getBp1() {
		return m_bp1;
	}

	public String getBp2() {
		return m_bp2;
	}

	public String getBp3() {
		return m_bp3;
	}

	public String getCheckNameSql(String pk_corp) {
		String sql = null;
		String code = getCustcode();
		String name = getCustname();
		boolean forupdate = getPk_cubasdoc() != null && getPk_cubasdoc().length() != 0;
		String checkCorp = pk_corp != null && pk_corp.length() != 0 ? pk_corp : getPk_corp();
		sql = (new StringBuilder()).append("select pk_cubasdoc,custcode,custname from bd_cubasdoc where (custcode ='").append(code.trim()).append("'  or custname = '").append(name.trim()).append("') ").toString();
		if (!"0001".equals(checkCorp)) sql = (new StringBuilder()).append(sql).append(" and (pk_corp = '0001' or (pk_cubasdoc in (select pk_cubasdoc from bd_cumandoc where pk_corp = '").append(checkCorp).append("'))) ").toString();
		if (forupdate) sql = (new StringBuilder()).append(sql).append(" and pk_cubasdoc <> '").append(getPk_cubasdoc()).append("'").toString();
		return sql;
	}

	public String getCheckNameSqlForExChange(String pk_corp) {
		String sql = null;
		String code = getCustcode();
		boolean forupdate = getPk_cubasdoc() != null && getPk_cubasdoc().length() != 0;
		String checkCorp = pk_corp != null && pk_corp.length() != 0 ? pk_corp : getPk_corp();
		sql = (new StringBuilder()).append("select pk_cubasdoc,custcode from bd_cubasdoc where custcode ='").append(code.trim()).append("' ").toString();
		if (!"0001".equals(checkCorp)) sql = (new StringBuilder()).append(sql).append(" and (pk_corp = '0001' or (pk_cubasdoc in (select pk_cubasdoc from bd_cumandoc where pk_corp = '").append(checkCorp).append("'))) ").toString();
		if (forupdate) sql = (new StringBuilder()).append(sql).append(" and pk_cubasdoc <> '").append(getPk_cubasdoc()).append("'").toString();
		return sql;
	}

	public String getConaddr() {
		return m_conaddr;
	}

	public String getCorrespondunit() {
		return m_correspondunit;
	}

	public UFDateTime getCreatetime() {
		return createtime;
	}

	public String getCreator() {
		return creator;
	}

	public UFDouble getCreditmny() {
		return m_creditmny;
	}

	public String getCustcode() {
		return m_custcode;
	}

	public String getCustname() {
		return m_custname;
	}

	public Integer getCustprop() {
		return m_custprop;
	}

	public String getCustprop_name() {
		return custprop_name;
	}

	public String getCustshortname() {
		return m_custshortname;
	}

	public String getDef1() {
		return m_def1;
	}

	public String getDef10() {
		return m_def10;
	}

	public String getDef11() {
		return m_def11;
	}

	public String getDef12() {
		return m_def12;
	}

	public String getDef13() {
		return m_def13;
	}

	public String getDef14() {
		return m_def14;
	}

	public String getDef15() {
		return m_def15;
	}

	public String getDef16() {
		return m_def16;
	}

	public String getDef17() {
		return m_def17;
	}

	public String getDef18() {
		return m_def18;
	}

	public String getDef19() {
		return m_def19;
	}

	public String getDef2() {
		return m_def2;
	}

	public String getDef20() {
		return m_def20;
	}

	public String getDef3() {
		return m_def3;
	}

	public String getDef4() {
		return m_def4;
	}

	public String getDef5() {
		return m_def5;
	}

	public String getDef6() {
		return m_def6;
	}

	public String getDef7() {
		return m_def7;
	}

	public String getDef8() {
		return m_def8;
	}

	public String getDef9() {
		return m_def9;
	}

	public Integer getDr() {
		return m_dr;
	}

	public UFBoolean getDrpnodeflag() {
		return m_drpnodeflag;
	}

	public String getEcotype() {
		return m_ecotypesincevfive;
	}

	public String getEcotype_name() {
		return ecotype_name;
	}

	public String getEcotypesincevfive() {
		return m_ecotypesincevfive;
	}

	public String getEmail() {
		return m_email;
	}

	public String getEngname() {
		return m_engname;
	}

	public String getEntityName() {
		return "Cubasdoc";
	}

	public String getFax1() {
		return m_fax1;
	}

	public String getFax2() {
		return m_fax2;
	}

	public UFBoolean getFreecustflag() {
		return m_freecustflag;
	}

	public UFBoolean getIsconnflag() {
		return m_isconnflag;
	}

	public String getLegalbody() {
		return m_legalbody;
	}

	public String getLinkman1() {
		return m_linkman1;
	}

	public String getLinkman2() {
		return m_linkman2;
	}

	public String getLinkman3() {
		return m_linkman3;
	}

	public String getLoginCorp() {
		return loginCorp;
	}

	public String getMemo() {
		return m_memo;
	}

	public String getMnecode() {
		return m_mnecode;
	}

	public String getMobilephone1() {
		return m_mobilephone1;
	}

	public String getMobilephone2() {
		return m_mobilephone2;
	}

	public String getMobilephone3() {
		return m_mobilephone3;
	}

	public String getModifier() {
		return modifier;
	}

	public UFDateTime getModifytime() {
		return modifytime;
	}

	public String getPhone1() {
		return m_phone1;
	}

	public String getPhone2() {
		return m_phone2;
	}

	public String getPhone3() {
		return m_phone3;
	}

	public String getPk_areacl() {
		return m_pk_areacl;
	}

	public String getPk_corp() {
		return m_pk_corp;
	}

	public String getPk_corp1() {
		return m_pk_corp1;
	}

	public String getPk_cubasdoc() {
		return m_pk_cubasdoc;
	}

	public String getPk_cubasdoc1() {
		return m_pk_cubasdoc1;
	}

	public String getpk_pricegroup() {
		return m_pk_pricegroup;
	}

	public String getPk_pricegroup() {
		return m_pk_pricegroup;
	}

	public String getPrimaryKey() {
		return m_pk_cubasdoc;
	}

	public UFDouble getRegisterfund() {
		return m_registerfund;
	}

	public String getSaleaddr() {
		return m_saleaddr;
	}

	public String getTaxpayerid() {
		return m_taxpayerid;
	}

	public String getTrade() {
		return m_trade;
	}

	public UFDateTime getTs() {
		return m_ts;
	}

	public String getUrl() {
		return m_url;
	}

	public String getZipcode() {
		return m_zipcode;
	}

	public void setAccdefault(String accdefault) {
		this.accdefault = accdefault;
	}

	public void setBp1(String newBp1) {
		m_bp1 = newBp1;
	}

	public void setBp2(String newBp2) {
		m_bp2 = newBp2;
	}

	public void setBp3(String newBp3) {
		m_bp3 = newBp3;
	}

	public void setConaddr(String newConaddr) {
		m_conaddr = newConaddr;
	}

	public void setCorrespondunit(String m_correspondunit) {
		this.m_correspondunit = m_correspondunit;
	}

	public void setCreatetime(UFDateTime createtime) {
		this.createtime = createtime;
	}

	public void setCreator(String creator) {
		this.creator = creator;
	}

	public void setCreditmny(UFDouble newCreditmny) {
		m_creditmny = newCreditmny;
	}

	public void setCustcode(String newCustcode) {
		m_custcode = newCustcode;
	}

	public void setCustname(String newCustname) {
		m_custname = newCustname;
	}

	public void setCustprop(Integer newCustprop) {
		int prop = newCustprop != null ? newCustprop.intValue() : 0;
		switch (prop) {
		case 0: // '\0'
			setCustprop_name(NCLangRes4VoTransl.getNCLangRes().getStrByID("10080804", "UPP10080804-000028"));
			break;

		case 1: // '\001'
			setCustprop_name(NCLangRes4VoTransl.getNCLangRes().getStrByID("10080804", "UPP10080804-000034"));
			break;

		case 2: // '\002'
			setCustprop_name(NCLangRes4VoTransl.getNCLangRes().getStrByID("10080804", "UPP10080804-000035"));
			break;

		case 3: // '\003'
			setCustprop_name(NCLangRes4VoTransl.getNCLangRes().getStrByID("10080804", "UPP10080804-000036"));
			break;
		}
		m_custprop = newCustprop;
	}

	public void setCustprop_name(String newCustprop_name) {
		custprop_name = newCustprop_name;
	}

	public void setCustshortname(String newCustshortname) {
		m_custshortname = newCustshortname;
	}

	public void setDef1(String newDef1) {
		m_def1 = newDef1;
	}

	public void setDef10(String newDef10) {
		m_def10 = newDef10;
	}

	public void setDef11(String newDef11) {
		m_def11 = newDef11;
	}

	public void setDef12(String newDef12) {
		m_def12 = newDef12;
	}

	public void setDef13(String newDef13) {
		m_def13 = newDef13;
	}

	public void setDef14(String newDef14) {
		m_def14 = newDef14;
	}

	public void setDef15(String newDef15) {
		m_def15 = newDef15;
	}

	public void setDef16(String newDef16) {
		m_def16 = newDef16;
	}

	public void setDef17(String newDef17) {
		m_def17 = newDef17;
	}

	public void setDef18(String newDef18) {
		m_def18 = newDef18;
	}

	public void setDef19(String newDef19) {
		m_def19 = newDef19;
	}

	public void setDef2(String newDef2) {
		m_def2 = newDef2;
	}

	public void setDef20(String newDef20) {
		m_def20 = newDef20;
	}

	public void setDef3(String newDef3) {
		m_def3 = newDef3;
	}

	public void setDef4(String newDef4) {
		m_def4 = newDef4;
	}

	public void setDef5(String newDef5) {
		m_def5 = newDef5;
	}

	public void setDef6(String newDef6) {
		m_def6 = newDef6;
	}

	public void setDef7(String newDef7) {
		m_def7 = newDef7;
	}

	public void setDef8(String newDef8) {
		m_def8 = newDef8;
	}

	public void setDef9(String newDef9) {
		m_def9 = newDef9;
	}

	public void setDr(Integer dr) {
		m_dr = dr;
	}

	public void setDrpnodeflag(UFBoolean newDrpnodeflag) {
		m_drpnodeflag = newDrpnodeflag;
	}

	public void setEcotype(String newEcotype) {
		m_ecotypesincevfive = newEcotype;
	}

	public void setEcotype_name(String newEcotype_name) {
		ecotype_name = newEcotype_name;
	}

	public void setEcotypesincevfive(String m_ecotypesincevfive) {
		this.m_ecotypesincevfive = m_ecotypesincevfive;
	}

	public void setEmail(String newEmail) {
		m_email = newEmail;
	}

	public void setEngname(String newEngname) {
		m_engname = newEngname;
	}

	public void setFax1(String newFax1) {
		m_fax1 = newFax1;
	}

	public void setFax2(String newFax2) {
		m_fax2 = newFax2;
	}

	public void setFreecustflag(UFBoolean newFreecustflag) {
		m_freecustflag = newFreecustflag;
	}

	public void setIsconnflag(UFBoolean newIsconnflag) {
		m_isconnflag = newIsconnflag;
	}

	public void setLegalbody(String newLegalbody) {
		m_legalbody = newLegalbody;
	}

	public void setLinkman1(String newLinkman1) {
		m_linkman1 = newLinkman1;
	}

	public void setLinkman2(String newLinkman2) {
		m_linkman2 = newLinkman2;
	}

	public void setLinkman3(String newLinkman3) {
		m_linkman3 = newLinkman3;
	}

	public void setLoginCorp(String loginCorp) {
		this.loginCorp = loginCorp;
	}

	public void setMemo(String newMemo) {
		m_memo = newMemo;
	}

	public void setMnecode(String newMnecode) {
		m_mnecode = newMnecode;
	}

	public void setMobilephone1(String newMobilephone1) {
		m_mobilephone1 = newMobilephone1;
	}

	public void setMobilephone2(String newMobilephone2) {
		m_mobilephone2 = newMobilephone2;
	}

	public void setMobilephone3(String newMobilephone3) {
		m_mobilephone3 = newMobilephone3;
	}

	public void setModifier(String modifier) {
		this.modifier = modifier;
	}

	public void setModifytime(UFDateTime modifytime) {
		this.modifytime = modifytime;
	}

	public void setPhone1(String newPhone1) {
		m_phone1 = newPhone1;
	}

	public void setPhone2(String newPhone2) {
		m_phone2 = newPhone2;
	}

	public void setPhone3(String newPhone3) {
		m_phone3 = newPhone3;
	}

	public void setPk_areacl(String newPk_areacl) {
		m_pk_areacl = newPk_areacl;
	}

	public void setPk_corp(String newPk_corp) {
		m_pk_corp = newPk_corp;
	}

	public void setPk_corp1(String newPk_corp1) {
		m_pk_corp1 = newPk_corp1;
	}

	public void setPk_cubasdoc(String newPk_cubasdoc) {
		m_pk_cubasdoc = newPk_cubasdoc;
	}

	public void setPk_cubasdoc1(String newPk_cubasdoc1) {
		m_pk_cubasdoc1 = newPk_cubasdoc1;
	}

	public void setpk_pricegroup(String newM_pk_pricegroup) {
		m_pk_pricegroup = newM_pk_pricegroup;
	}

	public void setPk_pricegroup(String newM_pk_pricegroup) {
		m_pk_pricegroup = newM_pk_pricegroup;
	}

	public void setPrimaryKey(String newPk_cubasdoc) {
		m_pk_cubasdoc = newPk_cubasdoc;
	}

	public void setRegisterfund(UFDouble newRegisterfund) {
		m_registerfund = newRegisterfund;
	}

	public void setSaleaddr(String newSaleaddr) {
		m_saleaddr = newSaleaddr;
	}

	public void setTaxpayerid(String newTaxpayerid) {
		m_taxpayerid = newTaxpayerid;
	}

	public void setTrade(String newTrade) {
		m_trade = newTrade;
	}

	public void setTs(UFDateTime ts) {
		m_ts = ts;
	}

	public void setUrl(String newUrl) {
		m_url = newUrl;
	}

	public void setZipcode(String newZipcode) {
		m_zipcode = newZipcode;
	}

	private static final long serialVersionUID = -5466556221953336348L;
	public String custprop_name;
	public String ecotype_name;
	public String m_bp1;
	public String m_bp2;
	public String m_bp3;
	public String m_conaddr;
	public String m_correspondunit;
	public UFDouble m_creditmny;
	public String m_custcode;
	public String m_custname;
	public Integer m_custprop;
	public String m_custshortname;
	public String m_def1;
	public String m_def10;
	public String m_def11;
	public String m_def12;
	public String m_def13;
	public String m_def14;
	public String m_def15;
	public String m_def16;
	public String m_def17;
	public String m_def18;
	public String m_def19;
	public String m_def2;
	public String m_def20;
	public String m_def3;
	public String m_def4;
	public String m_def5;
	public String m_def6;
	public String m_def7;
	public String m_def8;
	public String m_def9;
	public Integer m_dr;
	public UFBoolean m_drpnodeflag;
	public String m_ecotypesincevfive;
	public String m_email;
	public String m_engname;
	public String m_fax1;
	public String m_fax2;
	public UFBoolean m_freecustflag;
	public UFBoolean m_isconnflag;
	public String m_legalbody;
	public String m_linkman1;
	public String m_linkman2;
	public String m_linkman3;
	public String m_memo;
	public String m_mnecode;
	public String m_mobilephone1;
	public String m_mobilephone2;
	public String m_mobilephone3;
	public String m_phone1;
	public String m_phone2;
	public String m_phone3;
	public String m_pk_areacl;
	public String m_pk_corp;
	public String m_pk_corp1;
	public String m_pk_cubasdoc;
	public String m_pk_cubasdoc1;
	public String m_pk_pricegroup;
	public UFDouble m_registerfund;
	public String m_saleaddr;
	private UFBoolean m_sealflag_b;
	public String m_taxpayerid;
	public String m_trade;
	public String m_url;
	public String m_zipcode;
	public UFDateTime m_ts;
	private String creator;
	private UFDateTime createtime;
	private String modifier;
	private UFDateTime modifytime;
	private String accdefault;
	private String loginCorp;

	@Override
	public String getPKFieldName() {
		return "pk_cubasdoc";
	}

	@Override
	public String getParentPKFieldName() {
		return null;
	}

	@Override
	public String getTableName() {
		return "bd_cubasdoc";
	}
}